package com.bwie.controller;

import com.bwie.common.domain.Menu;
import com.bwie.common.result.Result;
import com.bwie.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @className: MenuController
 * @Description: TODO
 * @version: v1.８.0
 * @author: 汪菲阳
 * @date: 2025/8/24 14:20
 */
@CrossOrigin
@RequestMapping("menu")
@RestController
public class MenuController {
    @Autowired
    private MenuService menuService;

    @GetMapping("menuTree")
    public Result<List<Menu>> menuTree(){
        return Result.success(menuService.menuTree());
    }
}
